#include <iostream>
#include <vector>
#include <string>

using namespace std;

bool isPalindrome(int x) {
    if(x < 0) return false;
    int i = x, j = 0;
    while (x){
		j = j * 10 + x % 10;
		x /= 10;
	}
    return i == j ? true : false;
}

int main(){
    int x = 121;
    cout << isPalindrome(x) << endl;
    return 0;
}
